#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <windows.h>
//#include <iostream>
#include <winbase.h>

#include "..\USBSniffer\public.h"
#include "..\MyPacketProcessor\exports.h"

#include <winioctl.h>

#include <QMessageBox>
#include <QMainWindow>
#include <QList>
#include <QAbstractTableModel>

#include "PacketInformationDialog.h"


#define SIZE_OF_PACKET 131072

DWORD WINAPI WorkerThread(LPVOID CompletionPortID);

typedef struct _PACKET
{
    OVERLAPPED Overlapped;
    char Buffer[SIZE_OF_PACKET];
    HANDLE Device;

} PACKET, * PPACKET;

typedef struct _HANDLE_DATA
{
    int something;
} HANDLE_DATA, *PHANDLE_DATA;


extern HANDLE CompletionPort;

DWORD WINAPI PacketGeneratorThread(LPVOID lpParameter);

/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

    PacketInformationDialog *packInfDlg;

private slots:
    void on_tableView_doubleClicked(QModelIndex index);
    void on_stopButton_clicked();
    void on_startButton_clicked();
	void on_actionFilter_clicked();
};

#endif // MAINWINDOW_H
